﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace University.Workshop.Presenters.OtbData.Modify
{
    public class PresenterModifyFirstStep
    {
        IFirstStepForModify view;

        public PresenterModifyFirstStep(IFirstStepForModify view)
        {
            this.view = view;
        }

        public void UpdateViewData()
        {
            view.Name = view.OtbDataToModify.Name;
            view.Managment = view.OtbDataToModify.Managment;
            view.Background = view.OtbDataToModify.Background;
            view.ExpirationDate = view.OtbDataToModify.ExpirationDay;
        }

        public void ChargeOtbData()
        {
            view.OtbDataToModify.Name = view.Name;
            view.OtbDataToModify.Managment = view.Managment;
            view.OtbDataToModify.Background = view.Background;
            view.OtbDataToModify.ExpirationDay = view.ExpirationDate;
        }

        public void LoadImage(string path)
        {
            view.Background = path;
        }
    }
}
